package model

import "time"

type TaskLog struct {
	ID         uint      `gorm:"primaryKey"`
	TaskID     uint      `gorm:"index;comment:关联任务ID"`
	Status     string    `gorm:"type:varchar(20);comment:执行状态(success/failed/running)"`
	StartTime  time.Time `gorm:"comment:开始时间"`
	EndTime    time.Time `gorm:"comment:结束时间"`
	Duration   int       `gorm:"comment:执行时长(毫秒)"`
	DataCount  int       `gorm:"comment:处理数据量"`
	ErrorMsg   string    `gorm:"type:text;comment:错误信息"`
	LogContent string    `gorm:"type:text;comment:详细日志"`
	CreatedAt  time.Time `gorm:"comment:创建时间"`
	UpdatedAt  time.Time `gorm:"comment:更新时间"`
}
